package com.miguo.bean;

import com.miguo.framework.request.JsonData;

import java.io.Serializable;

public class CategoryBean implements Serializable {
    private static final long serialVersionUID = 1L;

    private Long id;
    private String name;
    private String icon;
    private Long pid;
    private Long ordid;

    public CategoryBean(Long id, String name, String icon, Long pid, Long ordid) {
        this.id = id;
        this.name = name;
        this.icon = icon;
        this.pid = pid;
        this.ordid = ordid;
    }

    public CategoryBean(JsonData json) {
        id = json.optLong("id");
        name = json.optString("name");
        icon = json.optString("icon");
        pid = json.optLong("pid");
        ordid = json.optLong("ordid");
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public Long getPid() {
        return pid;
    }

    public void setPid(Long pid) {
        this.pid = pid;
    }

    public Long getOrdid() {
        return ordid;
    }

    public void setOrdid(Long ordid) {
        this.ordid = ordid;
    }

}
